home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / cnet / lotterywheel.lha / lotterywheel.arexx next >
Encoding:
Text File  |  1997-01-11  |  2.2 KB  |  94 lines

  1. /*    This is my second Arexx Program.
  2.  
  3.          DestySoft 1990 - For C-NET Amiga! (DNK Software)
  4.                Written July 20 - 1990  by: Prince Desty
  5.  
  6.      BONUS is the Time They Win   ITEMS is how many Lottery Numbers
  7.  
  8.     to choose from.
  9.  Last Update on Sept. 8th, 1990 by Desty!
  10.  color update on febuary 29th, 1992
  11.  
  12. Hey,it's time to put this in the C-NET AmiNet Archives.  
  13. Now I'm known as DangerX   Contact me at copycats@uconect.net
  14. I have quite a bit of Arexx stuff that I'll be uploading over time as
  15. I upgrade it to 3.05c C-NET compatible.
  16.                     -DangerX  August 1996
  17.         
  18. This Program is 100% free to be used.  It may not be modified and re-released
  19. under any other name.  If you wish to incorporate it onto a CD Collection
  20. You have my Approval.
  21.                 
  22. */
  23.  
  24. Options results
  25. bufferflush
  26. signal on ioerr
  27. signal on error
  28. signal on syntax
  29.  
  30. /* Sysop Defineable Variables */
  31.  
  32. bonus = 30 /* Amount of time they will win in minutes  */
  33. Items = 44 /* How many numbers are there?  ie. 1 in 44 */
  34.  
  35. /* end of Definable Variables */
  36.  
  37. getuser 19
  38. cls = d2c(result)
  39. getuser 1
  40. username = result
  41.  
  42. rum = RANDOM(1,items,time('s'))
  43. transmit 'z5c3 ** The Lottery Wheel ** z0'
  44. Transmit 'c2n1Win BIG, Gain Extra BBS time! Bonus of 'BONUS' Minutes!'
  45. transmit 'c2 there is a 1 in 'items' Chance of Winning!'
  46. sendstring 'n1c7Do you Wish to Spin The Wheel? c2<y/n>:c3 '
  47. bufferflush
  48. getchar
  49. yn = upper(result)
  50. if yn == 'Y' then call play
  51. sendstring 'No!'
  52. call quit
  53. play:
  54. sendstring 'Yes!'
  55. transmit ' '
  56. play1:
  57. transmit ' '
  58. query 'c5Enter a Number from 1-'items':c3'
  59. ans = result
  60. if left(ans,1)="#" then signal QUIT
  61. if ans<1 then call play1
  62. if ans>items then call play1
  63. xx='h0'
  64. transmit ' '
  65. sendstring ' c3Spinning The Wheel.....s2'
  66. do i = 1 to 10
  67. rum = random(1,items,time('s'))
  68. sendstring xx
  69. if rum >0 then xx='h1'
  70. if rum >9  then xx='h2'
  71. if rum >99 then xx='h3'
  72. sendstring rum
  73. end
  74. if ans == rum then call win
  75. transmit 's0n1c6Sorry the number wasc1 'rum
  76. transmit 'c7[Any Key]g0h9h1'
  77. call quit
  78.  
  79. quit:
  80. shutdown
  81. exit
  82.  
  83. win:
  84. transmit 'n1 '
  85. transmit 'c7You Won!'
  86. transmit 'c2Adding c3'bonus' c7Minutes to your time!'
  87. addtime bonus
  88. call quit
  89.  
  90. ioerr:
  91. syntax:
  92. error:
  93. transmit "*BOOM* the Program just broke on line "Sigl
  94.